package br.com.lm.view;

import br.com.lm.filter.QuestionarioSenha;
import br.com.lm.filter.QuestionarioSenhaConverter;
import java.io.Serializable;
import java.util.List;
import javax.faces.event.ValueChangeEvent;

/**
 * @author Robson Motta
 */
public class QuestionarioSenhaBean implements Serializable {
    
    private static final long serialVersionUID = 1L;

    private List<QuestionarioSenha> questionarios;
    private QuestionarioSenha questionario;
    
    public QuestionarioSenhaBean() {
        QuestionarioSenhaConverter questionarioSenhaConverter = new QuestionarioSenhaConverter();
        questionarios = questionarioSenhaConverter.questionarioSenhaDB; 
    }
    
    public QuestionarioSenha getQuestionario() {
        return questionario;
    }

    public void setQuestionario(QuestionarioSenha questionario) {
        this.questionario = questionario;
    }

    public List<QuestionarioSenha> getQuestionarios() {
        return questionarios;
    }

    public void setQuestionarios(List<QuestionarioSenha> questionarios) {
        this.questionarios = questionarios;
    }

    public void questionarioChangeListener(ValueChangeEvent event) {
         if (event.getNewValue() instanceof QuestionarioSenha) {
         }        
         else {
             questionario = null;
         }
    }   
}